package com.zcoj.mail.service;

import com.zcoj.mail.pojo.Mail;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;

import java.util.List;

/**
 * @author chenbin
 * @version 1.0
 * @description: TODO
 * @date 2023/5/13 11:41
 */
@CacheConfig(cacheNames = "MailService")
public interface MailService {

    @Cacheable(key = "'getMailData'")
    public List<Mail> getMailData();

    @CacheEvict(value = "MailService",allEntries = true)
    public Integer updateMail(Mail mail);

}
